import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询用户三餐表
export function listUserCost(query) {
  return request({
    url: '/system/cost/list',
    method: 'get',
    params: query
  })
}

// 新增
export function addCost(data) {
  return request({
    url: '/system/cost',
    method: 'post',
    data: data
  })
}

// 删除用户
export function delCost(userId) {
  return request({
    url: '/system/cost/' + userId,
    method: 'delete'
  })
}

// 修改用户
export function updateCost(data) {
  return request({
    url: '/system/cost',
    method: 'put',
    data: data
  })
}

// 查看用户
export function viewCost(userId) {
  return request({
    url: '/system/cost/' + userId,
    method: 'get',
    // params: query
  })
}

// 饼图数据
export function pieData(query) {
  return request({
    url: '/system/cost/pie',
    method: 'get',
    params: query
  })
}
// 折线图数据
export function LineData(query) {
  return request({
    url: '/system/cost/line',
    method: 'get',
    params: query
  })
}

// 导出
export function exportExcel(query) {
  return request({
    url: '/system/cost/export',
    method: 'post',
    params: query
  })
}


